#include <QApplication>
#include "MainWidget.h"
#include <QInputDialog>
#include <QMessageBox>


int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    // 密码
    bool ok = false;
    QString text = QInputDialog::getText(nullptr, "输入密码", "密码:", QLineEdit::Password,
                                         "", &ok);
    if (!ok || text.isEmpty()) {
        return 0;
    }

    if (text != "WeiyiCvv@2023") {
        QMessageBox::warning(nullptr, "提示", "密码错误!");
        return 0;
    }

    MainWidget w;
    w.show();

    return a.exec();
}
